#ifndef _PARSER_H_
#define _PARSER_H_

#include "Parameter.h"
#include <cstdio>

class Dictionary;

//------------------------------------------------------------------------------

class Parser : public ClassParameter {
public:
  static Parser& instance();
  int createDictionaryToken(const char*);
  int getDictionaryToken(const char*) const;
  const char* getDictionaryWord(int) const;
  void dumpDictionary() const;
  void print(FILE*) const;
  void printAssigned(ostream&) const;
  bool moduleIsActive(int) const;
  void activateModule(int);
  void activateModules(const set<int>&);
  
private:
  Parser();
  ~Parser() {}
  static Parser* inst;
  Dictionary* dictionary;
  set<int> activeModuleTags;
};

//------------------------------------------------------------------------------

#endif
